any all in python

22

>>> multiples_of_6 = (not (i % 6) for i in range(1, 10))
>>> any(multiples_of_6)
True
>>> list(multiples_of_6)
[False, False, False]

if true and true and true and true: none
if all ([true, true, true, true]): none

if true or true or true or true or true: none
if any ([true, true, true, true, true]): none

Comments

Submit
0 Comments